package test;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Date;
import java.util.Optional;
import java.util.stream.Stream;

import com.alibaba.fastjson.JSONObject;

public class Xx {
	public static void main(String[] args) throws IOException {
		// BufferedWriter bw=new BufferedWriter(new FileWriter("c:/uuuu.txt"));
		// for(int i=0;i<20*10000;i++){
		// bw.write(JSONObject.toJSONString(new Bean("a", "b", new Date())));
		// bw.newLine();
		// }
		// bw.close();

		// String[] split = "".split("=");
		// System.out.println(split.length);

		// File f=new File("/dfa/xxx/uuu.xxx");
		// System.out.println(f.getPath());
		//
		// System.out.println(f.getParent());

		BufferedReader br = new BufferedReader(new FileReader("c:/xxx.txt"));
		Stream<String> lines = br.lines();
		// System.out.println(lines.count());
		Stream<String> skip = lines.skip(1);
		Stream<String> limit = skip.limit(3);
		limit.forEach((line)->{
			System.out.println(line);
			
		});
		
		limit.forEach((line)->{
			System.out.println(line);
			
		});
	}
}
